package com.lq.educationsystem.admin.controller;

import com.lq.educationsystem.admin.entiy.AdminTb;
import com.lq.educationsystem.admin.service.AdminService;
import com.lq.educationsystem.common.util.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "管理员功能")
@RestController
@RequestMapping("/admin")
public class AdminController {
    //导入service
    @Autowired
    AdminService adminService;

    //登录功能

    @Operation(summary = "登录功能")
    @PostMapping("/login")
    public Result adminLogin(@RequestBody AdminTb adminInfo){
        Result result = adminService.login(adminInfo);
        //调用mapper
        return result;
    }
}
